export function extractContentBeforeBrackets(
  input: unknown | string
): unknown | string {
  if (typeof input !== "string") {
    return input;
  }
  const match = input.match(/^(.+)\(/);
  return match && match[1] ? match[1] : input;
}

export function extractContentInBrackets(
  input: unknown | string
): unknown | string {
  if (typeof input !== "string") {
    return input;
  }
  const match = input.match(/\(([^)]+)\)/);
  return match && match[1] ? match[1] : input;
}
